{% extends 'layout.html' %}

{% block content %}
    <div>
        <a class="btn btn-success" href="/admin/add/"><span class="glyphicon glyphicon-plus-sign"></span> 新建管理员</a>
    </div>
    <div>
        <div class="panel panel-default" style="margin-top: 10px">
            <div class="panel-heading"><span class="glyphicon glyphicon-list"></span> 管理员列表</div>
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>用户名</th>
                    <th>密码</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% for obj in admin_list %}
                    <tr>
                        <td>{{ obj.id }}</td>
                        <td>{{ obj.username }}</td>
                        <td>*******</td>
                        <td>
                            <a class="btn btn-primary btn-xs" style="margin-right: 5px" href="/admin/{{ obj.id }}/edit/">编辑</a>
                            <a class="btn btn-danger btn-xs" href="/admin/{{ obj.id }}/delete/">删除</a>
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
        <ul class="pagination">
            {{ page_string }}
        </ul>
    </div>
{% endblock %}
